"""
 @author adun
 @date 2020/10/31 23:53
 数组
"""

class ArrayDemo:
    def for_cars(self):
        cars=["Porsche", "Volvo", "BMW"]
        for car in cars:
            print(car)

    def add_array(self):
        cars = ["Porsche", "Volvo", "BMW"]
        cars.append("Audi")
        print(cars)
        cars.remove("Volvo")
        print(cars)
        cars.pop(2)
        print(cars)

if __name__ == '__main__':
    arrayDemo=ArrayDemo()
    arrayDemo.for_cars()
    arrayDemo.add_array()

